<template>
  <div class="ja-container">
    <div class="material-textfield green width-full" :class="{'validate-err': errors.has('workYears')}">
      <input type="text" required v-model="info.workYears" v-validate="'required|between:0,99'" name="workYears"/>
      <label data-content="从事专业技术工作年限(年，输入数字即可)*"></label>
    </div>
    <div class="textarea-con" :class="{'validate-err': errors.has('unusualReport')}">
      <label data-content="破格申报依据*">破格申报依据*&nbsp;&nbsp;&nbsp;<span class="lg-promp">不超过600字</span></label>
      <textarea rows="3" class="width-full" v-model="info.unusualReport" v-validate="'required|max:600'" name="unusualReport"></textarea>
    </div>
    <div class="textarea-con" :class="{'validate-err': errors.has('mainAchievement')}">
      <label data-content="从事专业技术工作期间主要业绩*">从事专业技术工作期间主要业绩*&nbsp;&nbsp;&nbsp;<span class="lg-promp">不超过600字</span></label>
      <textarea rows="3" class="width-full" v-model="info.mainAchievement" v-validate="'required|max:600'" name="mainAchievement"></textarea>
    </div>
  </div>
</template>

<script>
  export default {
    title: '破格申请材料',
    name: 'badapp-material',
    props: {
      badappmaterial: {}
    },
    data () {
      return {
        // fileList: [],
        info: {}
      }
    },
    methods: {
      validate () {
        return this.$validator.validateAll()
      }
    },
    mounted () {
      this.info = Object.assign({}, this.badappmaterial)
      // this.setInit()
    },
    watch: {
      'info': {
        handler: function (val, oldVal) {
          this.$emit('update:badappmaterial', this.info)
        },
        deep: true
      }
    }
  }
</script>
